// 1191. [字符串统计] 日活月活统计 中
// https://oj.rnd.huawei.com/problems/1191/details sscanf
// 在[^]中增加表示相反的意思，上面的[a-z]表示一个不包含任何a-z之间的字符串
// 、.、/和_ 输入 5 2020-02-01|192.168.218.218|/login.do|success
// 2020-02-01|192.168.218.218|/login.do|success
// 2020-02-01|192.168.210.210|/login.do|fail
// 2020-02-02|192.168.210.210|/login.do|success
// 2020-02-02|192.168.218.218|/login.do|success
// 输出 2 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

#include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;

class Solution {
 public:
  // 待实现函数，在此函数中填入答题代码
  vector<int> GetActiveUserNum(const vector<string>& logs) {
    vector<int> res;
    vector<set<unsigned int> > vtDaily(32);
    set<unsigned int> stMonth;
    for (size_t i = 0; i < logs.size(); i++) {
      int month = 0;
      size_t day = 0;
      int ip[4] = {0};
      char addr[100] = {0};
      sscanf(logs[i].c_str(), "%*d-%d-%u|%d.%d.%d.%d|%50s", &month, &day,
             &ip[0], &ip[1], &ip[2], &ip[3], addr);
      if (addr == string("/login.do|success")) {
        unsigned int ip_t =
            (ip[0] << 24) + (ip[1] << 16) + (ip[2] << 8) + ip[3];  // ? ff
        vtDaily[day].insert(ip_t);
        stMonth.insert(ip_t);
      }
    }
    res.push_back(stMonth.size());
    for (int i = 1; i < 32; i++) {
      res.push_back(vtDaily[i].size());
    }
    return res;
  }
};

inline int ReadInt() {
  int number;
  cin >> number;
  return number;
}

template <typename T>
inline vector<T> ReadVector(int size) {
  vector<T> objects(size);
  for (int i = 0; i < size; ++i) {
    cin >> objects[i];
  }
  return objects;
}

template <typename T>
inline void WriteVector(const vector<T>& objects, char delimeter = ' ') {
  auto it = objects.begin();
  if (it == objects.end()) {
    return;
  }
  cout << *it;
  for (++it; it != objects.end(); ++it) {
    cout << delimeter << *it;
  }
  cout << endl;
}

vector<string> ReadVector_test() {
  vector<string> res;
  res.push_back("2020-02-01|192.168.218.218|/login.do|success");
  res.push_back("2020-02-01|256.256.256.256|/login.do|success");
  res.push_back("2020-02-01|192.168.210.210|/login.do|fail");
  res.push_back("2020-02-02|192.168.210.210|/login.do|success");
  res.push_back("2020-02-02|192.168.218.218|/login.do|success");
  return res;
}

int main_1191() {
  int n = 5;
  //    n = ReadInt();
  vector<string> logs;
  //    logs = ReadVector_test();
  logs = ReadVector<string>(n);

  Solution solu;
  vector<int> result = solu.GetActiveUserNum(logs);
  WriteVector(result, ' ');

  return 0;
}
